package com.ruoyi.web.controller.system;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysCruise;
import com.ruoyi.system.service.SysCruiseService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "巡航设备管理模块")
@RestController
@RequestMapping("/system/cruise")
public class SysCruiseController {

    @Autowired
    SysCruiseService sysCruiseService;

    @ApiOperation("查询巡航设备组合列表")
    @PostMapping("/getCruiseList")
    public AjaxResult getCruiseList(@RequestBody SysCruise sysCruise) {
        return sysCruiseService.getCruiseList(sysCruise);
    }

    @ApiOperation("删除巡航设备组合")
    @PostMapping("/deleteCruiseList")
    public AjaxResult deleteCruiseList(@RequestBody SysCruise sysCruise) {
        return sysCruiseService.deleteCruiseList(sysCruise);
    }

    @ApiOperation("查询巡航设备")
    @PostMapping("/getCruiseDevice")
    public AjaxResult getCruiseDevice() {
        return sysCruiseService.getCruiseDevice();
    }

    @ApiOperation("绑定设备到组合")
    @PostMapping("/addCruiseDevice")
    public AjaxResult addCruiseDevice(@RequestBody SysCruise sysCruise){
        return sysCruiseService.addCruiseDevice(sysCruise);
    }

    @ApiOperation("添加巡航设备组合")
    @PostMapping("/addCruise")
    public AjaxResult addCruise(@RequestBody SysCruise sysCruise){
        return sysCruiseService.addCruise(sysCruise);
    }

}
